﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CinemaSystem
{
    public partial class ypck : Form
    {
        public ypck()
        {
            InitializeComponent();
        }
        string sqlstr;
        DataTable dt = new DataTable();
        private void ypck_Load(object sender, EventArgs e)
        {
           
            sqlstr = string.Format("select * from Movie");
            dt = DBHelper.GetDataTable(sqlstr);

            dataGridView1.AutoGenerateColumns = false;
            dataGridView1.DataSource = dt;
        }
        public static int id;
        private void dataGridView1_RowEnter(object sender, DataGridViewCellEventArgs e)
        {
            id = e.RowIndex;
        }
       
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
          gpck gpck = new gpck();
            gpck.Show();
            this.Hide();
         
        }
    }
}
